import { create } from 'zustand';
import { subscribeWithSelector } from 'zustand/middleware';
import { IDocument } from '../types';

type IProjectStore = {
  projectInfo: IDocument;
  setProjectInfo: (projectInfo: IDocument) => void;
};

export const useProjectStore = create<IProjectStore>()(
  subscribeWithSelector((set) => ({
    projectInfo: undefined,
    setProjectInfo: (projectInfo: IDocument) => set({ projectInfo }),
  })),
);
